package org.linlinjava.litemall.StrategyDesginModel;

import org.linlinjava.litemall.StrategyDesginModel.interfaces.MallSaleStrategy;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 普通游客
 *
 * @author zhy
 * @create 2018-11-29 9:54
 **/
@Service
public class NormalStrategy implements MallSaleStrategy {

	@Override
	public BigDecimal sale(String name, BigDecimal money) {
		money=(money.multiply(new BigDecimal(1))).setScale(2, RoundingMode.HALF_UP);
		System.out.println("欢迎光临"+name+",消费"+money);
		return money;
	}

	@Override
	public String getType() {
		return "normallMember";
	}
}
